<?php
require('../../cofd/common.php');
$rawPostData = file_get_contents("php://input");
$jsonsz = json_decode($rawPostData, true); 
$old = $jsonsz['username'];
$newvip = $jsonsz['vip'];
$sql = "UPDATE exam_user SET vip='$newvip' WHERE username='$old'";
$conn -> query($sql);
$conn -> close();
echo json_encode(array('code'=>0,'msg'=>'ok','json'=>$jsonsz),JSON_UNESCAPED_UNICODE);